    <div class="list_category">
        <ul>
            <li><a href="<?php echo $this->baseUrl('admincp/fashioncategory/create'); ?>">Thêm danh mục mới</a></li>
        </ul>
    </div>
</div>

<!-- Begin Content -->
<div class="section">
    <div class="heading_section">
        <span>Quản lý danh mục đồ trẻ em</span>
    </div>
    
    <div class="content">
        <form action="" method="post">
        <p style="float: right; margin-right: 15px">Tổng số: <?php echo $this->total - 1; ?> kết quả</p><br/>
        <table class="list-records">
            <tr class="list-header">
                <td>Tên danh mục</td>
                <td style="width: 80px">Sắp xếp</td>
                <td width="70">Trạng thái</td>
                <td colspan="2">Tùy chọn</td>
            </tr>
            <?php if(count($this->data) > 1) :
                $category = new Admincp_Model_Fashioncategory();
                $orderArr = $category->orderGroup($this->data);
                foreach($this->data as $value) :
                    $levelCss = '';
		            if($value['level'] == 0){
		            	$name = '<span style="color:red">' . $value['name'] . '</span>';
		            }else if($value['level'] == 1){
		            	$name = ' + ' . $value['name'];
		            }else{
		            	$name = ' - - ' . $value['name'];
		            	$levelCss =  'padding-left: ' . (20 * $value['level']) . 'px;';
		            }
	            
		            $orderName	= 'ordering[' . $value['lft'] . ']';
		            $orderValue	= $category->getNodeOrdering($value['parents'],$value['lft']);
                    if($value['level'] > 0) :
            ?>
            <tr>
                <td style="<?php echo $levelCss;?>"><?php echo $name; ?></td>
                <td style="text-align: center;"><?php echo $this->formText($orderName, $orderValue, array(
                		'size' => 4, 
                		'id' => $orderName, 
                		'style' => 'text-align: center'
                	)); ?></td>
                <td style="text-align: center;">
                    <a href="<?php echo $this->baseUrl('admincp/fashioncategory/publish?id=').$value['id'].'&status='.$value['status']; ?>">
                    <?php if($value['status'] == '1') : ?>
                        <img src="<?php echo $this->baseUrl(''); ?>public/templates/admin/images/publish.png" />
                    <?php else : ?>
                        <img src="<?php echo $this->baseUrl(''); ?>public/templates/admin/images/unpublish.png" />
                    <?php endif; ?>
                    </a>
                </td>
                <td class="tools">
                    <a href="<?php echo $this->baseUrl('admincp/fashioncategory/edit?id=').$value['id']; ?>">
                        <img src="<?php echo $this->baseUrl(''); ?>public/templates/admin/images/edit.png" />
                    </a>
                </td>
                <td class="tools">
                    <a href="<?php echo $this->baseUrl('admincp/fashioncategory/delete?id=').$value['id']; ?>" onclick="return remove_alert()">
                        <img src="<?php echo $this->baseUrl(''); ?>public/templates/admin/images/remove.png" />
                    </a>
                </td>
            </tr>
            <?php
                        endif;
                    endforeach;
                else :
            ?>
            <tr>
                <td colspan="5" style="font-style: italic;">Không tìm thấy kết quả nào</td>
            </tr>
            <?php endif; ?>
        </table>
        
        <div class="list-bottom">
            <div class="list-buttons">
                <?php echo $this->formSubmit('add','Tạo mới',array('class'=>'button')); ?>
                <?php echo $this->formSubmit('refresh','Làm mới',array('class'=>'button')); ?>
                <?php echo $this->formSubmit('orders','Sắp xếp',array('class'=>'button')); ?>
            </div>
        </div>
        </form>
    </div>
</div>
<!-- End Content -->